/* youtube-videos.css
   Matches the existing navy/gold "glass" theme.
   If your CSS variables have different names, swap the fallback
   values below (after the commas) with your real ones. */

.yt-video-grid {
    margin-top: 40px;
}

/* ---------- Slider ---------- */
.yt-slider {
    position: relative;
    margin-top: 20px;
}

.yt-slider-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.yt-slider-head h3 {
    margin: 0;
    font-family: 'Playfair Display', serif;
    font-size: 1.6rem;
    color: var(--text-primary, #333333);
}
body.dark-theme .yt-slider-head h3 {
    color: #f0f0f0;
}
.yt-subscribe {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 30px;
    background: #e62117;
    color: #fff;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.yt-subscribe:hover {
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(230, 33, 23, 0.35);
}
.yt-subscribe i {
    font-size: 1.05rem;
}

.yt-slider-viewport {
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}
.yt-slider-viewport::-webkit-scrollbar {
    display: none;
}
.yt-slider-track {
    display: flex;
    gap: 24px;
}
.yt-slider-track .yt-video-card {
    flex: 0 0 calc((100% - 48px) / 3);
    min-width: 0;
}
@media (max-width: 1100px) {
    .yt-slider-track .yt-video-card {
        flex-basis: calc((100% - 24px) / 2);
    }
}
@media (max-width: 700px) {
    .yt-slider-track .yt-video-card {
        flex-basis: 100%;
    }
}

.yt-slider-btn {
    position: absolute;
    top: 46%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border-radius: 50%;
    border: 1px solid rgba(223, 180, 41, 0.4);
    background: rgba(10, 25, 47, 0.75);
    color: #f9e076;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    backdrop-filter: blur(6px);
    transition: all 0.25s ease;
}
.yt-slider-btn:hover {
    background: var(--gold-medium, #d4af37);
    color: #0a192f;
    transform: translateY(-50%) scale(1.08);
}
.yt-slider-prev { left: -24px; }
.yt-slider-next { right: -24px; }
@media (max-width: 1100px) {
    .yt-slider-prev { left: 8px; }
    .yt-slider-next { right: 8px; }
}

.yt-slider-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}
.yt-slider-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: none;
    border-radius: 50%;
    background: rgba(223, 180, 41, 0.35);
    cursor: pointer;
    transition: all 0.25s ease;
}
.yt-slider-dot.active {
    width: 24px;
    border-radius: 8px;
    background: var(--gold-medium, #d4af37);
}
.yt-slider-dot:hover {
    background: var(--gold-medium, #d4af37);
}

.yt-video-card {
    background: var(--glass, rgba(48, 41, 6, 0.27));
    border: 1px solid var(--glass-border, rgba(255, 255, 255, 0.1));
    border-radius: 16px;
    overflow: hidden;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.yt-video-card:hover,
.yt-video-card:focus-visible {
    transform: translateY(-6px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.yt-thumb-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.yt-thumb-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.yt-video-card:hover .yt-thumb-wrap img {
    transform: scale(1.08);
}

.yt-play-badge {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yt-play-badge i {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--secondary, #dfb429);
    color: var(--primary, #0a192f);
    font-size: 20px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: transform 0.25s ease;
}

.yt-video-card:hover .yt-play-badge i {
    transform: scale(1.12);
}

.yt-card-body {
    padding: 14px 16px 18px;
}

.yt-card-body h4,
.showcase-video-title {
    margin: 0;
    font-size: 15px;
    line-height: 1.4;
    color: var(--text, #eef2f7);
    font-family: 'Montserrat', sans-serif;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.yt-loading,
.yt-empty {
    text-align: center;
    padding: 40px 0;
    color: var(--text, #eef2f7);
    opacity: 0.75;
    font-family: 'Montserrat', sans-serif;
}

/* ---------- Lightbox ---------- */
.yt-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(10, 25, 47, 0.92); /* var(--primary) with opacity */
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.25s ease;
}

.yt-lightbox.open {
    display: flex;
    opacity: 1;
}

.yt-lightbox-inner {
    position: relative;
    width: 100%;
    max-width: 960px;
}

.yt-iframe-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.yt-iframe-wrap iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.yt-lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 34px;
    line-height: 1;
    cursor: pointer;
}

.yt-lightbox-close:hover {
    color: var(--secondary, #dfb429);
}

@media (max-width: 600px) {
    .yt-lightbox-close {
        top: -38px;
        font-size: 28px;
    }
}
